import { defineStore } from 'pinia'


export const userUserStore = defineStore('userInfoId', {
    state: () => ({
        userInfo:[],//用户对象
        avaitUrl:'',
    }),
    getters: {
        Array:(state) =>state.userInfo,
        String:(state) =>state.avaitUrl,
    },
    actions: ({
        setUserInfos(data){
            this.userInfo = data
            this.avaitUrl = data.avatar
        }
    }),
    persist: true
})